package edu.rit.hvz.android;

import android.app.Activity;
import android.content.Intent;

public class Utils {
	private static int sTheme = R.style.HVZTheme;
	private static Activity main;

	/**
	 * Set the theme of the Activity, and restart it by creating a new Activity
	 * of the same type.
	 */
	public static void changeToTheme(int theme) {
		sTheme = theme;
		main.finish();
		main.startActivity(new Intent(main, main.getClass()));
	}

	/** Set the theme of the activity, according to the configuration. */
	public static void onActivityCreateSetTheme(Activity activity) {
		activity.setTheme(sTheme);
	}
	
	public static void setAct(Activity act){
		main = act;
	}
}
